package com.lysj.bhp.coinexchange.controller;

import com.lysj.bhp.coinexchange.base.CoinExchangeContent;
import com.lysj.bhp.coinexchange.domain.Apply;
import com.lysj.bhp.coinexchange.domain.BhpcRecord;
import com.lysj.bhp.coinexchange.vo.BhpcRecordVo;
import com.lysj.bhp.util.web.Resp;
import io.swagger.annotations.ApiOperation;
import org.springframework.data.domain.Sort;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("admin/bhpc_record")
public class BhpcRecordController extends CoinExchangeContent {

    @RequestMapping("/list")
    public Resp list() {
        List<BhpcRecord> bhpcRecordList = bhpcRecordRepository.findAll(new Sort(Sort.Direction.DESC, "createDate"));
        return new Resp(bhpcRecordList);
    }
}
